package com.lyf.scm.common.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 公共DTO字段
 * <p>
 * @Author: zbw  2020/7/3
 */
@Data
public class BaseDTO implements Serializable {

    @ApiModelProperty(value = "当前页码")
    private Integer pageNum = 1;

    @ApiModelProperty(value = "每页记录数")
    private Integer pageSize = 10;


    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("数据标识")
    private String opSign;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty("是否启用。0：否；1：是")
    private Integer isAvailable;

    @ApiModelProperty("是否逻辑删除。0：否；1：是")
    private Integer isDeleted;

    @ApiModelProperty(value = "版本号")
    private Integer versionNo;

    @ApiModelProperty("创建人")
    private Long creator;

    @ApiModelProperty("创建人名")
    private String creatorName;

    @ApiModelProperty("更新人")
    private Long modifier;

    @ApiModelProperty("更新人名")
    private String modifierName;

    @ApiModelProperty("商家id")
    private Long merchantId;

    @ApiModelProperty("应用id")
    private Long appId;


}
